package com.woniuxy.project.campus.canteen.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.woniuxy.project.campus.canteen.mapper.MerchantapplicationMapper;
import com.woniuxy.project.campus.canteen.model.Merchantapplication;
import com.woniuxy.project.campus.canteen.service.MerchantapplicationService;
import com.woniuxy.project.campus.util.StaticData;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 猫将军
 * @since 2025年02月19日
 */
@Service
public class MerchantapplicationServiceImpl extends ServiceImpl<MerchantapplicationMapper, Merchantapplication> implements MerchantapplicationService {

    @Resource
    private MerchantapplicationMapper merchantapplicationMapper;
    @Override
    public List<Merchantapplication> viewTheApplicationList() {
        QueryWrapper<Merchantapplication> queryWrapper = new QueryWrapper();
        QueryWrapper<Merchantapplication> auditStatus = queryWrapper.eq("audit_status", StaticData.SHOP_APPLY_STATUS_WAIT);
        List<Merchantapplication> merchantapplications = merchantapplicationMapper.selectList(auditStatus);
        return merchantapplications;
    }
}
